: ------------------------------------------------------
: http://rosettacode.org/wiki/Formatted_numeric_output
: ------------------------------------------------------
$ '{0|num:05.3}',7.125


: ------------------------------------------------------
: http://rosettacode.org/wiki/Range_extraction
: ------------------------------------------------------
a=[1,2,4,6,8,9,11]
n=a:N i=1 x=a[1] y=a[1]
@2-n:i*v
  ?  y+1=v  y=v  z=1
  !? x=y $'{x},',x  x=v  y=v  z=0
  !  $'{x}-{y},',x,y  x=v  y=v  z=0
? z $'{x}-{y}',x,y ! $'{x}',x


: ------------------------------------------------------
: http://rosettacode.org/wiki/Map_range
: ------------------------------------------------------
#t(a1,a2,b1,b2,s) = (b1+(s-a1)*(b2-b1)/(a2-a1))
@0-10 $#+':'+t(0,10,-1,0,#)


: ------------------------------------------------------
: http://rosettacode.org/wiki/Five_weekends
: ------------------------------------------------------
b=[]
@1900-2100:y s=0 
  @1-12:m d=D(y,m,31) ?d*d.Wd=6 n+ s+ ?1905>y>2095 $d.Mn,y
  ?s=0 b+y
$n,' months with 5 weekends'
$b.N,' boring years: ',b

: ------------------------------------------------------
: http://rosettacode.org/wiki/Sorting_algorithms/Selection_sort
: ------------------------------------------------------
#sort(a) @a:i @i+1-a.N:j ?a[j]<a[i] a[i]<=>a[j] ^a
#sort(a) @a:i n,j=Min(a[i:]), ?~i=j a[i]<=>a[j] ^a

sort([3,6,8,9,4,5]) 


: ------------------------------------------------------
: http://rosettacode.org/wiki/Loop_over_multiple_arrays_simultaneously
: ------------------------------------------------------
a=['a','b','c'] b=['A','B','C'] c=[1,2,3]
n=Max(a.N,b.N,c.N)
@n $a#,b#,c#

a=['a','b','c'] b=['A','B','C'] c=[1,2,3] n=Max(a.N,b.N,c.N) @n $a#,b#,c#
: if array index is out of bounds just print null type '' ø 


: ------------------------------------------------------
: http://rosettacode.org/wiki/Sum_of_a_series
: ------------------------------------------------------
$ Sum([@1000 1/#^2])
or
$ [@1000 1/#^2].Sum
or
$ ∑[@1000 1/#^2]
or
n=0 @1000 n+=1/#^2; $n
or
n=0 @1000:i n+=1/i^2; $n


: ------------------------------------------------------
: http://rosettacode.org/wiki/Concurrent_computing
: ------------------------------------------------------
=> $'Enjoy' => $'Rosetta' => $'Code'
